package com.fzf.org.anno;


import com.fzf.org.anno.validator.MyPasswordValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Documented
@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(
        validatedBy = {MyPasswordValidator.class}
)
public @interface MyPassword {

    String message() default "密码必须包含大小写字母+数字，长度为6-16";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
